package com.mintuo.litecomposite.config;

import cn.dev33.satoken.stp.StpInterface;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class StpInterfaceImpl  implements StpInterface {

    /**
     * 获取权限列表
     * @param o loginId
     * @param s loginType
     * @return
     */
    @Override
    public List<String> getPermissionList(Object o, String s) {
        return null;
    }

    /**
     * 获取角色列表
     * @param o loginId
     * @param s loginType
     * @return
     */
    @Override
    public List<String> getRoleList(Object o, String s) {
        String loginid = (String)o;
        if(loginid.equalsIgnoreCase("000000")){
            List<String> retls = new ArrayList<>();
            retls.add("super-admin");
            return retls;
        }
        return null;
    }
}
